<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<!-- <script src='/Public/jquery.min.js'></script> -->
  <script src="https://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
  
	<script src='/Public/foundation/js/foundation.min.js'></script>
	<link rel="stylesheet" href="/Public/foundation/css/foundation.min.css">
  <script src='/Public/jquery.cityselect.js'></script>
  <script src='/Public/jquery.datetimepicker.full.js'></script>
  <link rel="stylesheet" href="/Public/jquery.datetimepicker.css">
   <script src="http://cdn.static.runoob.com/libs/foundation/5.5.3/js/vendor/modernizr.js"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<nav class="top-bar" data-topbar>
  <ul class="title-area">
    <li class="name">
      <h1><a href="#">后台管理</a></h1>
    </li>
  </ul>

  <section class="top-bar-section">
    <ul class="right">
      <li><a href=""><?php echo (session('name')); ?></a></li>
      <li><a href="<?php echo U('Login/doLogout');?>">退出</a></li>
    </ul>
  </section>
</nav>

<div class="small-2 columns">
<ul class="side-nav">
 <?php if(is_array($nav)): $i = 0; $__LIST__ = $nav;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li><a href="<?php echo U($vo['url']);?>" target='<?php echo ($vo["target"]?"_blank":null); ?>'><?php echo ($vo["mname"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
    </ul>
</div>
<div class="small-10 columns">

    <button type="button" class="button tiny" data-reveal-id="add">添加考试项目</button>
    <div id="add" class="reveal-modal" data-reveal>
        <form action="<?php echo U('doAddExamItem');?>" method="post">
            <table class='middle-12 column'>
                <tr>
                    <th>考试名称</th>
                    <th>考试类型</th>
                    <th>操作</th>
                </tr>
                <tr>
                    <td>
                        <input type="text" name="exam_name">
                    </td>
                    <td>
                        <select name="up" id="">
                            <!--<option>请选择</option>-->
                            <option value="0">添加考试类型</option>
                            <?php if(is_array($option)): $i = 0; $__LIST__ = $option;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["id"]); ?>"><?php echo ($vo["exam_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                        </select>
                    </td>
                    <td>
                        <button class='tiny'>添加</button>
                    </td>
                </tr>
            </table>
        </form>
        <a class="close-reveal-modal">&times;</a>
    </div>

    <?php if(!empty($res)): ?><table>
            <tr>
                <th>考试类型</th>
                <th>考试名称</th>
            </tr>
            <?php if(is_array($res)): $i = 0; $__LIST__ = $res;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
                    <td><?php echo ($vo["e1"]); ?></td>
                    <td><?php echo ($vo["e2"]); ?></td>
                </tr><?php endforeach; endif; else: echo "" ;endif; ?>
        </table><?php endif; ?>
<script>
$(document).ready(function() {
    $(document).foundation();
})
</script>

</div>

</body>
</html>